***********************************************************************************************
***
***	INTERTEMPORAL EVIDENCE ON THE STRATEGY OF POPULISM IN THE US (Gennaro, Lecce, Morelli)
***	Replication Package
***  
*** Appendix - Table A10
***
***********************************************************************************************



clear
est clear 

* Indicate location of the replication package here
cd "/Replication Package"

**********************************************
* Upload Data                            *****
**********************************************

use "3_data/for_analysis/congress_election_both.dta", clear

* Main outcome
global outvar "pop_dim2_s"

* Sample and controls
keep if uncont==0 & indep==0
global controls "female i.age_cat_num i.ethnicity2 i.educ_cat len_words i.election_year"

eststo: areg $outvar outsider_correct $controls , a(state) cluster(district)
eststo: areg $outvar econ $controls , a(state) cluster(district)
eststo: areg $outvar competitivedistricts $controls , a(state) cluster(district)

eststo: areg $outvar i.outsider_correct##c.econ $controls , a(state) cluster(district)
eststo: areg $outvar i.outsider_correct##c.competitivedistricts $controls , a(state) cluster(district)
eststo: areg $outvar i.competitivedistricts##c.econ $controls , a(state) cluster(district)


esttab _all using "4_results/tables/tabA10.tex", f label replace booktabs alignment(D{.}{.}{-1}) s(N r2, fmt(0 2) label("Observations" "R-squared")) nomtitles star(* 0.10 ** 0.05 *** 0.01) r2 b(3) se(3) brac nonotes 
